import { createBrowserRouter } from 'react-router-dom'
import LayoutApp from '@/page/Layout'
import Login from '@/page/Login'
import { AuthRoute } from '@/components/AuthRoute'
import Home from '@/page/Home'
import Test from '@/page/Test'
import Test2 from '@/page/Test2'


const router = createBrowserRouter([
    {
        path: '/',
        element: <AuthRoute><LayoutApp /></AuthRoute>,
        children: [
            {
                index: true,
                element: <Home />
            },
            {
                path: 'test',
                element: <Test />
            },
            {
                path: 'test2',
                element: <Test2 />
            }
        ]
    },
    {
        path: '/login',
        element: <Login />
    }
])

export default router